package com.kuaimacode.kframework.api.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kuaimacode.kframework.mybatis.mapper.index.BootstrapImgMapper;
import com.kuaimacode.kframework.mybatis.models.index.BootstrapImg;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author qinyong
 * @Title:
 * @Package com.kuaimacode.kframework.api.service
 * @Description: created by IntelliJ IDEA
 * @date 2019-03-11 10:50
 */
@Service
public class BootstrapImgService extends ServiceImpl<BootstrapImgMapper, BootstrapImg> {

    /**
     * 查询广告页图片
     * @return
     */
    public List<BootstrapImg> getAdsPage() {
        QueryWrapper<BootstrapImg> qryWrapper = new QueryWrapper<>();
        qryWrapper.eq("type", 0);
        qryWrapper.eq("status","0");
        return baseMapper.selectList(qryWrapper);
    }

    /**
     * 查询引导页图片
     * @return
     */
    public List<BootstrapImg> getGuidePage() {
        QueryWrapper<BootstrapImg> qryWrapper = new QueryWrapper<>();
        qryWrapper.eq("type", 1);
        qryWrapper.eq("status","0");
        return baseMapper.selectList(qryWrapper);
    }
}
